package com.patui.Weibo;
import java.util.Map;

import javax.crypto.spec.SecretKeySpec;

import com.patui.Utils.TextUtil;
public class Token {

	//token和token_secret
	private String mToken = "";
	protected String mOauth_Token_Secret = "";
	
	//verifier
	private String mOauth_verifier = "";
	
	//字符串,为了取出token和token_secret
	protected String[] responseStr = null;
	
	protected SecretKeySpec mSecretKeySpec;
	
	//三种构造函数
	public Token(){
		
	}
	
	public Token(String tokenAndSercretString) {
		Map<String,String> map=TextUtil.splitResponse(tokenAndSercretString);
        mOauth_Token_Secret = map.get("oauth_token_secret");
        mToken = map.get("oauth_token");
    }
	
	public Token(String token, String secret){
		mToken = token;
		mOauth_Token_Secret = secret;
	}
	
	public String getToken(){
		return this.mToken;
	}
	
	public String getSecret(){
		return mOauth_Token_Secret;
	}
	
	public void setVerifier(String verifier){
		mOauth_verifier = verifier;
	}

	public String getVerifier(){
		return mOauth_verifier;
	}
	
	protected void setSecretKeySpec(SecretKeySpec secretKeySpec) {
        this.mSecretKeySpec = secretKeySpec;
    }

    protected SecretKeySpec getSecretKeySpec() {
        return mSecretKeySpec;
    }
    
    
}
